/PROG  PNS0254
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "TOOL_DROP";
PROG_SIZE	= 642;
CREATE		= DATE 12-04-21  TIME 11:05:48;
MODIFIED	= DATE 12-04-21  TIME 11:12:56;
FILE_NAME	= PNS0255;
VERSION		= 0;
LINE_COUNT	= 30;
MEMORY_SIZE	= 1042;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:   ;
   2:  LBL[1] ;
   3:  DO[34:ATC COMPLETED]=OFF ;
   4:  WAIT DI[24:ATC READY]=ON    ;
   5:  IF DI[13:ATC CHUCK OK]=ON,JMP LBL[10] ;
   6:  IF DI[14:ATC UNCHUCK OK]=ON,JMP LBL[90] ;
   7:  JMP LBL[1] ;
   8:   ;
   9:  LBL[10] ;
  10:  IF DI[25:TOOL #1]=ON AND DI[26:TOOL #2]=OFF,JMP LBL[100] ;
  11:  IF DI[25:TOOL #1]=OFF AND DI[26:TOOL #2]=ON,JMP LBL[200] ;
  12:  IF DI[25:TOOL #1]=OFF AND DI[26:TOOL #2]=OFF,JMP LBL[200] ;
  13:  IF DI[25:TOOL #1]=ON AND DI[26:TOOL #2]=ON,JMP LBL[90] ;
  14:  JMP LBL[1] ;
  15:   ;
  16:  LBL[100] ;
  17:  CALL TL2_DROP    ;
  18:  DO[34:ATC COMPLETED]=ON ;
  19:  END ;
  20:   ;
  21:  LBL[200] ;
  22:  CALL TL1_DROP    ;
  23:  DO[34:ATC COMPLETED]=ON ;
  24:  END ;
  25:   ;
  26:  LBL[90] ;
  27:  MESSAGE[ERROR: T1 DETECT OR NOT] ;
  28:  UALM[7] ;
  29:  JMP LBL[10] ;
  30:   ;
/POS
/END
